#pragma once

#include "algohub_common_type.h"

namespace algo { class AlgoEvaluator; }

namespace algo 
{

class AlgoNSGAPrivate
{
public:
    AlgoNSGAPrivate();
    ~AlgoNSGAPrivate();

    int run_optimization(
        algo::AlgoEvaluator* pAlgo,
        const algobase::NSGAParams& nsga_params,
        const algobase::Paths& ip_paths,
        std::vector<algobase::FinalPathScore>& op_paths);
    std::vector<algobase::FinalPathScore> slidingAverage(
        const algobase::TaskConfig& config,
        const std::vector<algobase::TrajectoryCoords>& op_paths,
        int windowSize);
    double calculateNextHeightWithBounce(
        double currentHeight,
        double minHeight,
        double maxHeight,
        double Ddata);
    std::string date_to_string(algobase::Date date);
    std::string addHoursToDatetime(
        const std::string& start_time_str,
        double hours_to_add);
    algobase::TrajectoryCoord bezier_curve_point(
        const algobase::TrajectoryCoords& path,
        double t);
    double get_distance(
        const algobase::TrajectoryCoord& p1, 
        const algobase::TrajectoryCoord& p2);
    double calculate_path_smoothness(const algobase::TrajectoryCoords& path);
    bool is_inside_polygon(
        const algobase::Coord& point,
        const algobase::Polygon& polygon);
    int dangerous(
        const algobase::TaskConfig& config,
        algobase::TrajectoryCoords path,
        int& nums,
        double& times);
};

} // namespace algo